package com.medical.data.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 
 * </p>
 *
 * @author wz
 * @since 2024-05-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserPermission对象", description="")
public class UserPermission implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

      @NotBlank
    private String projectId;

    @NotBlank
    @ApiModelProperty(value = "项目的创建者id")
    private String projectOwnId;

    @ApiModelProperty(value = "项目参与者id")
    private String userId;


    @ApiModelProperty(value = "用户是否被同意加入项目,默认为0未同意")
    private Boolean realUser;

    @NotBlank
    @ApiModelProperty(value = "节点,表单创建,表单信息修改,表单删除的权限(默认为0,表示没有权限)")
    private Boolean formPermission;

    @NotBlank
    @ApiModelProperty(value = "数据收集权限")
    private Boolean dataPermission;

    @NotBlank
    @ApiModelProperty(value = "随访设置,随访短信发送权限")
    private Boolean followUpPermission;

    @NotBlank
    @ApiModelProperty(value = "患者创建和删除权限")
    private Boolean patientPermission;

    @NotBlank
    @ApiModelProperty(value = "医嘱生成和发送权限")
    private Boolean advicePermission;

    @TableLogic
    @ApiModelProperty(value = "软删除：0代表未删除1代表删除")
    private Boolean isDelete;

    @Version
    @ApiModelProperty(value = "版本号")
    private Integer version;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}
